import { PieChartForm, ChartFormContext, CircleChartForm, NightingaleChartForm } from "../ChartForm/index";
// import ChartForm from "@/ChartForm/ChartForm";
import PieChartFormAbstract from "@/ChartForm/PieChartForm/PieChartFormAbstract";
import { ESubChartType } from "../core/ChartType";
const PieChartForms: { [key: number]: PieChartFormAbstract } = {
    [ESubChartType.PieChart]: new PieChartForm(),
    [ESubChartType.CircleChart]: new CircleChartForm(),
    [ESubChartType.Nightingale]: new NightingaleChartForm(),

}
export default function PieFormFactory(subChartType?: ESubChartType) {
    subChartType = subChartType || ESubChartType.PieChart;
    return new ChartFormContext(PieChartForms[subChartType]);
}